<?php
class Admin extends AdminBase
{
	private $index;
	private $action;
	public function __construct()
	{
		parent::__construct();
		$this->do     = $this->filters($this->req['do'],'');
		$this->action = $this->filters($this->req['action'],'');
		$this->index  = $this->filters($this->req['index'],$this->do);
		$this->{$this->op}();
	}

	public function indexAction()
	{
		echo render($this->index);
		exit();
	}

	public function startAction()
	{
		$this->fetchData($this->getParam($this->action));
	}

	private function getParam($action)
	{
		return array_merge(['do'=>$this->do,'format'=>'json','action'=>$action],$this->req);
	}

}
new Admin();
exit;